// ==========================================================================
// GFast自动生成api操作代码。
// 生成日期：2024-04-24 10:28:10
// 生成路径: api/v1/business/seats.go
// 生成人：周志雄
// desc:座位相关参数
// company:云南奇讯科技有限公司
// ==========================================================================

package business

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/os/gtime"
	commonApi "github.com/tiger1103/gfast/v3/api/v1/common"
	"github.com/tiger1103/gfast/v3/internal/app/business/model"
)

// SeatsSearchReq 分页请求参数
type SeatsSearchReq struct {
	g.Meta     `path:"/list" tags:"座位" method:"get" summary:"座位列表"`
	Id         string `p:"id"`                                                           //主键ID
	RowNumber  string `p:"rowNumber" v:"rowNumber@integer#行号需为整数"`                       //行号
	SeatNumber string `p:"seatNumber" v:"seatNumber@integer#座位号需为整数"`                    //座位号
	TicketType string `p:"ticketType" v:"ticketType@integer#票类型(1甲、2乙、3丙)需为整数"`          //票类型(1甲、2乙、3丙)
	VenueId    string `p:"venueId" v:"venueId@integer#场馆ID需为整数"`                         //场馆ID
	CreatedAt  string `p:"createdAt" v:"createdAt@datetime#创建时间需为YYYY-MM-DD hh:mm:ss格式"` //创建时间
	commonApi.PageReq
	commonApi.Author
}

// SeatsSearchRes 列表返回结果
type SeatsSearchRes struct {
	g.Meta `mime:"application/json"`
	commonApi.ListRes
	List []*model.SeatsListResVo `json:"list"`
}

// SeatsAddReq 添加操作请求参数
type SeatsAddReq struct {
	g.Meta `path:"/add" tags:"座位" method:"post" summary:"座位添加"`
	commonApi.Author
	Id         int `p:"id" v:"required#主键ID不能为空"`
	RowNumber  int `p:"rowNumber" `
	SeatNumber int `p:"seatNumber" `
	TicketType int `p:"ticketType" `
	VenueId    int `p:"venueId" `
}

// SeatsAddRes 添加操作返回结果
type SeatsAddRes struct {
	commonApi.EmptyRes
}

// SeatsEditReq 修改操作请求参数
type SeatsEditReq struct {
	g.Meta `path:"/edit" tags:"座位" method:"put" summary:"座位修改"`
	commonApi.Author
	Id         int `p:"id" v:"required#主键ID不能为空"`
	RowNumber  int `p:"rowNumber" `
	SeatNumber int `p:"seatNumber" `
	TicketType int `p:"ticketType" `
	VenueId    int `p:"venueId" `
}

// SeatsEditRes 修改操作返回结果
type SeatsEditRes struct {
	commonApi.EmptyRes
}

// SeatsGetReq 获取一条数据请求
type SeatsGetReq struct {
	g.Meta `path:"/get" tags:"座位" method:"get" summary:"获取座位信息"`
	commonApi.Author
	Id int `p:"id" v:"required#主键必须"` //通过主键获取
}

// SeatsGetRes 获取一条数据结果
type SeatsGetRes struct {
	g.Meta `mime:"application/json"`
	*model.SeatsInfoRes
}

// SeatsDeleteReq 删除数据请求
type SeatsDeleteReq struct {
	g.Meta `path:"/delete" tags:"座位" method:"delete" summary:"删除座位"`
	commonApi.Author
	Ids []int `p:"ids" v:"required#主键必须"` //通过主键删除
}

// SeatsDeleteRes 删除数据返回
type SeatsDeleteRes struct {
	commonApi.EmptyRes
}

// 座位设置列表请求
type SeatsSettingReq struct {
	g.Meta `path:"/setting" tags:"座位" method:"post" summary:"座位设置首页列表"`
	commonApi.Author
	PerformanceDate *gtime.Time `json:"performanceDate" dc:"演出日期"`
	PerformanceTime string      `json:"performanceTime" dc:"演出时间"`
	AgentName       string      `json:"agentName" dc:"代理商名称"`
	Name            string      `json:"name" dc:"姓名"`
	Phone           string      `json:"phone" dc:"电话"`
}

// 座位设置列表响应
type SeatsSettingRes struct {
	List  []SeatsSettingListRes `json:"list"`
	Total int                   `json:"total"`
}

type SeatsSettingListRes struct {
	OrderNum        string      `json:"orderNum" dc:"订单号"`
	PerformanceId   int         `json:"performanceId" dc:"节目ID"`
	PerformanceName string      `json:"performanceName" dc:"节目名称"`
	PerformanceDate *gtime.Time `json:"performanceDate" dc:"演出日期"`
	PerformanceTime string      `json:"performanceTime" dc:"演出时间"`
	VenueName       string      `json:"venueName" dc:"场馆名称"`
	AgentName       string      `json:"agentName" dc:"代理商名称"`
	Name            string      `json:"name" dc:"姓名"`
	Phone           string      `json:"phone" dc:"手机号"`
	TicketType      int         `json:"ticketType" dc:"票类型(1甲、2乙、3丙)"`
	Num             int         `json:"num" dc:"购买数量"`
}

// 取消订单请求
type RefundReq struct {
	g.Meta `path:"/cancel" tags:"座位" method:"post" summary:"取消订单"`
	commonApi.Author
	OrderNum string `json:"orderNum" dc:"订单号"`
}

// 取消订单请求
type RefundRes struct {
	commonApi.EmptyRes
}
